package mapengine.effects
{
	import as3isolib.geom.IsoMath;
	import as3isolib.geom.Pt;
	
	import com.greensock.TweenLite;
	
	import flash.geom.Point;
	
	import mapengine.IsoMap;

	public class TweenTextFiledEffect extends EffectObjectBase
	{
		public function TweenTextFiledEffect(descriptor:Object=null)
		{
			_mouseEnabled = false;
			super(descriptor);
		}
		
		
		override public function start():void
		{
			var currentPoint:Pt = IsoMath.isoToScreen(new Pt(this.x , this.y));
			
			currentPoint = IsoMath.screenToIso(new Pt(currentPoint.x , currentPoint.y - 30));
			
			TweenLite.to(this , 3 , {x:currentPoint.x , y:currentPoint.y , alpha:0 , onComplete:onComplete});
		}
		
		protected function onComplete():void
		{
			assetEffect.dispose();
			assetEffect = null;
		}
		
	}
}